//
//  HotDetailsTableViewCell.m
//  BeautifulShoppings
//
//  Created by GivenBmli on 16/9/7.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "HotDetailsTableViewCell.h"
#import "HotRightModel.h"
#import "UIImageView+WebCache.h"
#import "TAMacro.h"
@implementation HotDetailsTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatSubView];
    }
    return self;
}
- (void)setHotRightModel:(HotRightModel *)hotRightModel{
    self.content.text = hotRightModel.content;
    //  self.avatar_url = hotRightModel.price;
    self.nickname.text = hotRightModel.nickname;
    [self.avatar_url sd_setImageWithURL:[NSURL URLWithString:hotRightModel.avatar_url] placeholderImage:[UIImage imageNamed:@"站位"]];
}
- (void)creatSubView{
    self.avatar_url = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/30, SCREEN_WIDTH/ 30, SCREEN_WIDTH /7 , SCREEN_WIDTH / 7 )];
    [self.contentView addSubview:self.avatar_url];
    self.nickname = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 5, SCREEN_WIDTH / 20, SCREEN_WIDTH / 4, SCREEN_WIDTH / 13)];
    [self.contentView addSubview:self.nickname];
    self.content = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 5, SCREEN_HEIGHT / 15, SCREEN_WIDTH , SCREEN_WIDTH / 15)];
    self.content.numberOfLines = 0;
    [self.contentView addSubview:self.content];
}
@end
